/*
 * @(#)InstanceIdentifier.java
 * Date 2013-08-09
 * Version 1.0
 * Author Jim Horner
 * Copyright (c)2012
 */


package us.hornerscorners.lamppost.model.common;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;


/**
 *
 * @author jim
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class InstanceIdentifier extends AbstractClassifiableModel {

    /** Field description */
    private String assigningAuthorityName;

    /** Field description */
    private Boolean displayable;

    /** Field description */
    private String extension;

    /** Field description */
    private String root;

    /**
     * Constructs ...
     *
     */
    public InstanceIdentifier() {

        super();
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public String getAssigningAuthorityName() {
        return assigningAuthorityName;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public Boolean getDisplayable() {
        return displayable;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public String getExtension() {
        return extension;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public String getRoot() {
        return root;
    }

    /**
     * Method description
     *
     *
     * @param curid
     *
     * @return
     */
    public boolean isNotSameId(InstanceIdentifier curid) {

        return (isSameId(curid) == false);
    }

    /**
     * Method description
     *
     *
     * @param curid
     *
     * @return
     */
    public boolean isSameId(InstanceIdentifier curid) {

        boolean result = false;

        if (curid != null) {

            result = (this.root.equals(curid.root)
                      && this.extension.equals(curid.extension));
        }

        return result;
    }

    /**
     * Method description
     *
     *
     * @param assigningAuthorityName
     */
    public void setAssigningAuthorityName(String assigningAuthorityName) {
        this.assigningAuthorityName = assigningAuthorityName;
    }

    /**
     * Method description
     *
     *
     * @param displayable
     */
    public void setDisplayable(Boolean displayable) {
        this.displayable = displayable;
    }

    /**
     * Method description
     *
     *
     * @param extension
     */
    public void setExtension(String extension) {
        this.extension = extension;
    }

    /**
     * Method description
     *
     *
     * @param root
     */
    public void setRoot(String root) {
        this.root = root;
    }
}
